/*
 *  测量及设计交接 单字段维护
 *  初始化基础字段 formItems
 *  其他修改根据项目Id配置 (formItems+'项目Id),配置一份
 * */

const object = {
    // 铁科院
    formItems: [
        {
            name: "reportNo",
            type: "input",
            isConfigLabel: true,
            label: "编号",
            labelDef: "编号：", // 默认值
            required: true,
        },
        {
            name: "parentProjName",
            type: "input",
            label: "项目名称：",
            typeIds: [59], // 技术交底书59
        },
        {
            name: "stationSupMind",
            type: "input",
            isConfigLabel: true,
            label: "",
            labelDef: "工程名称：", // 默认值
            typeIds: [21, 23, 24, 33, 34, 35, 53, 54, 55, 56, 59], // 测量控制现场交桩纪要21,控制网评估申请53-54-55-56,施工控制测量成果报验表23,图纸会审24,技术交底书59，曲线表33, 坡度表34, 断链表35
            required: true,
        },
        {
            name: "lineName",
            type: "input",
            label: "线路名称：",
            typeIds: [33, 34, 35], // 曲线表33, 坡度表34, 断链表35
            required: true,
        },
        {
            name: "projTypeName",
            type: "select",
            isConfigLabel: true,
            label: "",
            labelDef: "报审类型：", // 默认值
            required: true,
            typeIds: [53, 54, 55, 56], // 控制网评估申请53-54-55-56

            props: {
                optionsName: "options", //option字段
                changeFunc: "projTypeIdChange", //回调
                changeField: "projTypeId",
            },
        },
        {
            name: "projName",
            type: "select",
            isConfigLabel: true,
            label: "",
            label53: "施工合同段：",
            label54: "施工合同段：",
            label55: "施工合同段：",
            label56: "施工合同段：",
            labelDef: "标段：", // 控制网评估申请53-54-55-56
            props: {
                type: "selectPact",
                changeFunc: "selectPact",
                changeField: "projId",
            },
        },
        {
            name: "consName",
            type: "select",
            isConfigLabel: true,
            label: "：",
            labelDef: "建设单位：", // 默认值
            typeIds: [53, 54, 55, 56], // 控制网评估申请53-54-55-56

            props: {
                type: "selectOrg",
                changeFunc: "selectConsName",
                pactType: "020",
                changeField: "consId",
            },
        },
        {
            name: "monitorName",
            type: "select",
            isConfigLabel: true,
            label: "：",
            labelDef: "项目监理机构：", // 默认值
            typeIds: [23, 24, 33, 34, 35, 53, 54, 55, 56, 59], // 控制网评估申请53-54-55-56,施工控制测量成果报验表23,图纸会审24,技术交底书59 ，曲线表33, 坡度表34, 断链表35

            props: {
                type: "selectOrg",
                changeFunc: "selectMontorName",
                pactType: "015",
                changeField: "monitorId",
            },
        },
        {
            name: "pegMethod",
            type: "input",
            label: "设计文件图号：",
            typeIds: [59], // 技术交底书59
            required: true,
        },
        {
            name: "consMind",
            type: "input",
            label: "施工部位：",
            typeIds: [59], // 技术交底书59
            required: true,
        },
        {
            name: "sectionName",
            type: "input",
            label: "交底级别：",
            typeIds: [59], // 技术交底书59
            required: true,
        },
        {
            name: "measureOrg",
            type: "select",
            isConfigLabel: true,
            label: "",
            labelDef: "施工项目经理部：",
            typeIds: [23], //施工控制测量成果报验表23
            props: {
                type: "selectOrg",
                changeFunc: "selectMeasureOrgName",
                pactType: "015",
                changeField: "measureOrgId",
            },
        },
        {
            name: "measureOrg",
            type: "select",
            label: "评估单位：",
            typeIds: [53, 54, 55, 56], // 控制网评估申请53-54-55-56
            props: {
                type: "selectOrg",
                changeFunc: "selectMeasureOrgName",
                pactType: "015",
                changeField: "measureOrgId",
            },
        },
        /* {
        name: 'epegMark',
        type: 'input',
        typeIds: [53, 54, 55, 56], // 控制网评估申请53-54-55-56
        label: '测量桩号：',
        changeField: 'initResponseFieldFn',
        required: true
      }, */
        {
            name: "pegLocation",
            type: "input",
            typeIds: [21], // 测量控制现场交桩纪要21,
            label: "交桩桩号范围：",
            required: true,
        },
        {
            name: "wbsName",
            type: "input",
            // type: 'custom',
            isConfigLabel: true,
            label: "：",
            label23: "测量部位：",
            label24: "图纸名称：",
            labelDef: "交桩方式：", //默认值
            typeIds: [21, 23, 24], // 测量控制现场交桩纪要21, 施工控制测量成果报验表23,图纸会审24

            required: true,
        },
        {
            name: "cellName",
            type: "input",
            isConfigLabel: true,
            label: "：",
            label13: "原材料：",
            label21: "交桩地点：",
            label24: "会审地点：",
            labelDef: "验收工作：",
            typeIds: [21, 24], //会审地点24，测量控制现场交桩纪要21,

            required: true,
        },
        {
            name: "pegMethod1",
            type: "date",
            isConfigLabel: true,
            label: "：",
            labelDef: "交桩开始日期：",
            typeIds: [21], // 测量控制现场交桩纪要21-时间区间

            required: true,
        },
        {
            name: "pegMethod2",
            type: "date",
            isConfigLabel: true,
            label: "：",
            labelDef: "交桩结束日期：",
            typeIds: [21], // 测量控制现场交桩纪要21-时间区间

            required: true,
        },
        {
            name: "planstartDate",
            type: "date", // 'formItem'
            label: "申请开工日期：",
            props: {
                format: "YYYY-MM-DD",
            },
            typeIds: [7, 8, 9], //开工报告7-8-9,
            required: true,
        },
        {
            name: "planstartDate",
            type: "date",
            label: "开工日期：",
            props: {
                format: "YYYY-MM-DD",
            },
            typeIds: [10, 11], // 首件工程10-11
            required: true,
        },
        {
            name: "planendDate",
            type: "date",
            label: "完工日期：",
            props: {
                format: "YYYY-MM-DD",
            },
            typeIds: [10, 11], // 首件工程10-11
            required: true,
        },
        {
            name: "cdate",
            type: "date",
            props: {
                format: "YYYY-MM-DD",
            },
            isConfigLabel: true,
            label: "",
            label24: "会审日期：",
            label59: "交底日期：",
            labelDef: "会审日期：", // 默认值
            typeIds: [24, 59], // 图纸会审24, 技术交底书59

            required: true,
        },
        {
            name: "cdate",
            type: "date",
            props: {
                format: "YYYY-MM-DD",
            },
            isConfigLabel: true,
            label: "申请评估日期",
            label13: "进场日期：",
            labelDef: "申请评估日期：", // 默认值
            typeIds: [10, 11, 13], // 首件工程 10-11,人机料报审12-13-14-15，
        },
        {
            name: "buildOrg",
            type: "select",
            label: "是否上报建设单位：",
            required: true,
            typeIds: [53, 55], //  控制网评估申请53-54-55-56,
            props: {
                optionsName: "buildOrgOptions", //option字段
                changeFunc: "changeBuildOrg", //回调
                changeField: "buildOrgId",
            },
        },
        {
            name: "respUserName",
            type: "input",
            label: "填写人：",
            required: true,
        },
        {
            name: "applyDate",
            type: "date",
            label: "填写日期：",
            // useDefTimeObj:new Date(), //使用默认new Date()时间
            props: {
                format: "YYYY-MM-DD",
            },
            required: true,
        },
        // {
        //     name: "persion",
        //     type: "custom",
        //     width: "100%",
        //     label: "参建单位及人员信息：",
        //     typeIds: [21], // 测量控制现场交桩纪要21
        // },
        {
            name: "buildOrg",
            type: "input",
            label: "建设单位：",
            required: true,
            typeIds: [21],
        },
        {
            name: "buildOrgUser",
            type: "input",
            label: "参加人员：",
            required: true,
            typeIds: [21],
        },
        {
            name: "buildOrgContract",
            type: "input",
            label: "联系方式：",
            required: true,
            typeIds: [21],
        },
        {
            name: "measureOrg",
            type: "input",
            label: "测量单位：",
            required: true,
            typeIds: [21],
        },
        {
            name: "measureOrgUser",
            type: "input",
            label: "参加人员：",
            required: true,
            typeIds: [21],
        },
        {
            name: "measureOrgContract",
            type: "input",
            label: "联系方式：",
            required: true,
            typeIds: [21],
        },
        {
            name: "monitorName",
            type: "input",
            label: "监理单位：",
            required: true,
            typeIds: [21],
        },
        {
            name: "monitorUser",
            type: "input",
            label: "参加人员：",
            required: true,
            typeIds: [21],
        },
        {
            name: "monitorContract",
            type: "input",
            label: "联系方式：",
            required: true,
            typeIds: [21],
        },
        {
            name: "consName",
            type: "input",
            label: "施工单位：",
            required: true,
            typeIds: [21],
        },
        {
            name: "consUser",
            type: "input",
            label: "参加人员：",
            required: true,
            typeIds: [21],
        },
        {
            name: "consContract",
            type: "input",
            label: "联系方式：",
            required: true,
            typeIds: [21],
        },
        {
            name: "mainWork",
            type: "input",
            width: "100%",
            isConfigLabel: true,
            label: "",
            label21: "交桩纪要：", // 测量控制现场交桩纪要21
            labelDef: "交桩纪要：",
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
            typeIds: [21],
            required: true,
        },
        {
            name: "mainWork",
            type: "input",
            width: "100%",
            isConfigLabel: true,
            label: "",
            label59: "交底内容：", // 技术交底书59
            labelDef: "申请说明：",
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
            hiddenTypeIds: [21, 33, 34, 35],
        },
        {
            name: "pegContent",
            type: "input",
            width: "100%",
            label: "交桩内容：",
            typeIds: [21], // 测量控制现场交桩纪要21
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
            required: true,
        },
        {
            name: "pegResult",
            type: "input",
            width: "100%",
            label: "交桩提供成果资料：",
            typeIds: [21], // 测量控制现场交桩纪要21
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
            required: true,
        },
        {
            name: "pegCondition",
            type: "input",
            width: "100%",
            label: "交桩情况：",
            typeIds: [21], // 测量控制现场交桩纪要21
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
            required: true,
        },
        {
            name: "remarkWork",
            type: "input",
            width: "100%",
            isConfigLabel: true,
            label: "",
            label21: "其他说明：", // 测量控制现场交桩纪要21
            labelDef: "备注说明：",
            props: {
                type: "textarea",
                autosize: { minRows: 4 },
            },
        },
        {
            name: "subTable",
            type: "custom",
            width: "100%",
            isConfigLabel: true,
            label: "",
            label21: "测量控制桩现场交接记录表：",
            label24: "图纸会审记录",
            label33: "曲线表：",
            label34: "坡度表：",
            label35: "断链表：",
            labelDef: "明细表：",
            typeIds: [21, 24, 33, 34, 35], // 测量控制现场交桩纪要21, 图纸会审24, 曲线表33，坡度表34，断链表35
        },
    ],
};

const rformItems = function (isVue, projId) {
    const formItemsFiled = projId && `formItems${projId}`;
    if (object[formItemsFiled]) {
        return object[formItemsFiled];
    } else {
        return object[`formItems`];
    }
};

export default rformItems;
